﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace HTComics.Web.Common
{
    public static class Defaults
    {
        public static MailSetup MailSetup
        {
            get
            {
                return new MailSetup();
            }
        }

        public static string DomainName
        {
            get
            {
                return ConfigurationManager.AppSettings["DomainName"];
            }
        }

        public static string ConnectionString
        {
            get
            {
                return ConfigurationManager.ConnectionStrings[ConfigurationManager.AppSettings["DBConn"]].ConnectionString;
            }
        }

    }

    public class MailSetup
    {
        public string MailServer
        {
            get
            {
                return ConfigurationManager.AppSettings["MailServer"];
            }
        }

        public int MailPort
        {
            get
            {
                return Convert.ToInt32(ConfigurationManager.AppSettings["MailPort"].ToString());
            }
        }

        public string NoReplyAccount
        {
            get
            {
                return ConfigurationManager.AppSettings["MailAcc_NoReply"];
            }
        }

        public string InfoAccount
        {
            get
            {
                return ConfigurationManager.AppSettings["MailAcc_Info"];
            }
        }

        public string OrdersAccount
        {
            get
            {
                return ConfigurationManager.AppSettings["MailAcc_Orders"];
            }
        }

        public string FeedbackAccount
        {
            get
            {
                return ConfigurationManager.AppSettings["MailAcc_Feedback"];
            }
        }

    }
}